#include <REGX52.H>
#include "UART.h"
sbit ADDR0 = P1 ^ 0;
sbit ADDR1 = P1 ^ 1;
sbit ADDR2 = P1 ^ 2;
sbit ADDR3 = P1 ^ 3;
sbit ENLED = P1 ^ 4;

/// @brief LED初始化函数
void LED_Init()
{
	ADDR0 = 0;
	ADDR1 = 1;
	ADDR2 = 1;
	ADDR3 = 1;
	ENLED = 0;
}

void main(){
	LED_Init();
	UART_Init();
	while(1);
}

void UART_Routine()	interrupt 4
{
	if(RI==1){
		UART_SendByte(SBUF);
		P0=~SBUF;
		RI=0;
		
	}
}